package view.items;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Insets;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import model.Call;
import controller.Controller;
import controller.ControllerLighter;

public class PanelEndCall extends PanelAbstract {
	public PanelEndCall(Call call, Controller controller, ControllerLighter controllerLighter) {
		super(call, controllerLighter);
		JLabel jlabel = new JLabel(call.getFirstName());
		jlabel.setPreferredSize(new Dimension(65,20));
		jlabel.setForeground(this.colorLabel);
		
		JLabel jlabel2 = new JLabel(call.getLastName());
		jlabel2.setPreferredSize(new Dimension(65,20));
		jlabel2.setForeground(this.colorLabel);
		
		JLabel jlabel3 = new JLabel("Call Ended");
		jlabel3.setPreferredSize(new Dimension(122,20));
		jlabel3.setForeground(this.colorLabel);
		

		
		ImageIcon iconEnd = new ImageIcon(getClass().getResource("/img/close.png"));
		JButton buttonClear = new JButton(iconEnd);
		buttonClear.setFont(new Font("Arial",Font.ITALIC,10));
		buttonClear.setMargin(new Insets(0, 0, 0, 0));
		buttonClear.setPreferredSize(new Dimension(23,23));
		buttonClear.setActionCommand("buttonClear");
		buttonClear.addActionListener(controller);
		buttonClear.setContentAreaFilled(false);
		buttonClear.setBorderPainted(false);
		buttonClear.setToolTipText("Click to clear");
		
		this.add(jlabel2);
		this.add(jlabel);
		this.add(jlabel3);
		
		this.add(buttonClear);
	}
}
